package com.qasystem.qa.core.config;

import com.qasystem.qa.core.Intercepter.AuthIntercepter;
import org.checkerframework.checker.units.qual.A;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class AuthConfig implements WebMvcConfigurer {
    @Bean
    public AuthIntercepter initAuthIntercepter () {
        return new AuthIntercepter();
    }
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(initAuthIntercepter()).addPathPatterns("/bussiness/**").excludePathPatterns("/login","/public/**","/error","/js/**","/css/**","/common/**","/layui/**");

    }
}
